﻿namespace AllServer.Core;

public class RedisConstant
{
    /// <summary>
    /// 归因前缀
    /// </summary>
    public static string GYPrefix = "GY";

    /// <summary>
    /// Hash-应用推广渠道表Key，子key为应用推广渠道ID，Value为单表数据
    /// </summary>
    public static string GYAdChannelKey = $"{GYPrefix}:AdChannel";

    /// <summary>
    ///  Hash-应用商店表Key，子key为应用商店ID，Value为单表数据
    /// </summary>
    public static string GYAppShopKey = $"{GYPrefix}:AppShop";

    /// <summary>
    /// Hash-App信息表Key，子key为应用包名，Value为单表数据
    /// </summary>
    public static string GYAppInfoKey = $"{GYPrefix}:AppInfo";

    /// <summary>
    /// Hash-应用推广链接表Key，子key为应用推广链接地址，Value为单表数据
    /// </summary>
    public static string GYAppLinkKey = $"{GYPrefix}:AppLink";

    /// <summary>
    /// Hash-应用推广链接扩展Key，子key为应用推广链接ID，Value为单表数据
    /// </summary>
    public static string GYAppLinkExtendKey = $"{GYPrefix}:AppLinkExtend";

    /// <summary>
    /// Hash-用户设备指纹表Key，子key为用户设备指纹+"_"+推广链接ID，Value为单表数据
    /// </summary>
    public static string GYUserDeviceKey = $"{GYPrefix}:UserDevice";

    /// <summary>
    /// Hash-用户设备来源表Key，子key为用户设备指纹ID+"_"+推广链接ID，Value为单表数据
    /// </summary>
    public static string GYUserSourceKey = $"{GYPrefix}:UserSource";

    /// <summary>
    /// Hash-应用黑白名单配置表Key，子key为应用ID，Value为单表数据
    /// </summary>
    public static string GYAppBlackWhiteConfigKey = $"{GYPrefix}:AppBlackWhiteConfig";

    /// <summary>
    /// Hash-应用IP黑名单表Key，主key为固定值+应用ID，子key为ip地址的十进制数，Value为单表数据
    /// </summary>
    public static string GYAppIpBlackKey = $"{GYPrefix}:AppIpBlack:" + "{0}";

    /// <summary>
    /// Hash-应用IP黑名单表Key，主key为固定值+应用ID，子key为ip地址的十进制数，Value为单表数据
    /// </summary>
    public static string GYAppIpWhiteKey = $"{GYPrefix}:AppIpWhite:" + "{0}";

    /// <summary>
    /// Hash-应用国家黑名单表Key，主key为固定值+应用ID，子key为国家2位数代码，Value为单表数据
    /// </summary>
    public static string GYAppCountryBlackKey = $"{GYPrefix}:AppCountryBlack:" + "{0}";

    /// <summary>
    /// Hash-应用国家白名单表Key，主key为固定值+应用ID，子key为国家2位数代码，Value为单表数据
    /// </summary>
    public static string GYAppCountryWhiteKey = $"{GYPrefix}:AppCountryWhite:" + "{0}";

    /// <summary>
    /// Hash-全球国家表key，子key为国家两位代码,Value为单表数据
    /// </summary>
    public static string GYGlobalCountryKey = $"{GYPrefix}:GlobalCountry";

    /// <summary>
    /// ZSet-全球ip表key，分数为startip的uint，Value为单条数据
    /// </summary>
    public static string GYGlobalIpKey = $"{GYPrefix}:GlobalIp";
}
